<template>
  <div key="id">
    <div class="mb-10">描述内容</div>
    <el-input
      :rows="5"
      type="textarea"
      placeholder="请输入描述内容"
      v-model="text"
      @update:modelValue="inputHandle"
    />
  </div>
</template>

<script setup lang="ts">
import { ref, inject } from 'vue'
import type { VueComType } from '@/types'
const props = defineProps<{
  status: string
  isShow: boolean
  editCom: VueComType // 编辑组件
  id: string
  configKey: string // 配置项key --> title、desc...
}>()

const text = ref(props.status)
const updateStatus = inject('updateStatus')

function inputHandle(newVal: string) {
  updateStatus(props.configKey, newVal)
}
</script>

<style scoped></style>
